<template>
  <div class="range-time">
    <el-date-picker
      :disabled="disabled"
      class="number-input"
      v-model="value[0]"
      type="date"
      value-format="YYYY-MM-DD"
      controls-position="right"
      placeholder="请选择开始时间"
    />
    -
    <el-date-picker
      :disabled="disabled"
      v-model="value[1]"
      type="date"
      value-format="YYYY-MM-DD"
      class="number-input"
      controls-position="right"
      placeholder="请选择结束时间"
    />
  </div>
</template>

<script setup lang="ts">
const props = defineProps({
  disabled: Boolean,
  value: {
    type: Array,
    default: () => [null, null]
  }
})
const { disabled, value } = toRefs(props)
</script>

<style lang="scss" scoped>
.range-time {
  margin-left: 10px;
}
</style>
